export interface ApiChatMessage {
  role: 'user' | 'assistant' | 'system';
  content: string;
}

export interface ChatCompletionRequest {
  messages: ApiChatMessage[];
  model: string;
  temperature: number;
  userId: number;         // 新增
  healthDataId?: number | null; // 如果有健康数据关联
}

export interface ApiResponse<T> {
  code: number;
  message: string;
  data: T | null;
}

export interface AiReplyData {
  reply: string;
  history: ApiChatMessage[];
}